module Cpanel::ContactsHelper

  def language_nav_for(language)

    html = ""

    if language == '1'
      html.concat(content_tag(:li, content_tag(:a, '简体中文', href: "/cpanel/contacts/show/#{language}"), class: 'active'))
    else
      html.concat(content_tag(:li, content_tag(:a, '简体中文', href: "/cpanel/contacts/show/1")))
    end

    if language == '2'
      html.concat(content_tag(:li, content_tag(:a, '英文', href: "/cpanel/contacts/show/#{language}"), class: 'active'))
    else
      html.concat(content_tag(:li, content_tag(:a, '英文', href: "/cpanel/contacts/show/2")))
    end

    if language == '3'
      html.concat(content_tag(:li, content_tag(:a, '繁体中文', href: "/cpanel/contacts/show/#{language}"), class: 'active'))
    else
      html.concat(content_tag(:li, content_tag(:a, '繁体中文', href: "/cpanel/contacts/show/3")))
    end

    raw html
  end


end
